# Assume everyone chooses to hunt or slack randomly with probability of hunting
# given by their reputation.  When that is true food reserves decrease when the
# probability of hunting increases.
#
# We wish to coopreate with those who are doing poorly so we go hunting with
# those who go hunting the most themselves.
#
# Side note: this has barely been tested.

def hunt_choices(round_number, current_food, current_reputation, m, 
                 player_reputations):
    N = len(player_reputations) + 1
    if N == 2:
      return ['s']
    
    discriminant = sorted(player_reputations)[(N - 1) * 60 / 100]
    hunt_decisions = [('h' if rep + 1e-9 > discriminant else 's')
                      for rep in player_reputations]
    return hunt_decisions

def hunt_outcomes(food_earnings):
    pass

def round_end(award, m, number_hunters):
    pass

# print hunt_choices(4, 4, 4, 4, [0.1, 0.2, 0.3, 0.4])
